# -*- coding:utf-8 -*-
# @FileName  :utils.py
# @Time      :2020/10/25 14:59
# @Author    :zhoujirong
import parameterized
from common.log import Log
from biz.flow.user import UserRequest
from biz.cases.base_case import BaseCase
from common.params_operator import Param

class TestLogin(BaseCase):
    # def test_login(self):
    #     username = self.file_data.get('username')
    #     password = self.file_data.get('password')
    #     phonecode = self.file_data.get('phonecode')
    #     captcha = self.file_data.get('captcha')
    #     mode = self.file_data.get('mode')
    #     needPWD = self.file_data.get('needPWD')
    #     req = UserRequest.login(username, password,phonecode,captcha,mode,needPWD)
    #     return req

    @parameterized.parameterized.expand(Param.from_excel('login.xls'))
    def test_login_param(self,username, password,phonecode,captcha,mode,needPWD,check):
        ret = UserRequest.login(username, password,phonecode,captcha,mode,needPWD)
        Log.info(ret)
        self.assertEqual(check,ret.msg)


if __name__ == "__main__":
   pass